<template>
  <div>
    <div id="box">
      <div class="cell">
        <img src="/static/img/分类.png" alt="">
        <p>分类找药</p>
      </div>
      <div class="cell">
        <img src="/static/img/咨询.png" alt="">
        <p>咨询药师</p>
      </div>
      <div class="cell">
        <img src="/static/img/购物车.png" alt="">
        <p>购物车</p>
      </div>
      <div class="cell" @touchstart="personClk">
        <img src="/static/img/个人.png" alt="">
        <p>个人中心</p>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    methods:{
      personClk:function () {
        let t = localStorage.getItem('usermsg')
        console.log(t)
        if(t){
          location.hash = '/mine'
        }else {
          location.hash = '/login'
        }
      }
    }
  }
</script>

<style scoped>
  #box {
    position: fixed;
    bottom: 0;
    width: 100vw;
    background-color: white;
    display: flex;
    justify-content: space-around;
    height: 54px;
    align-items: center;
    border: solid 1px #eeeeee;
  }

  .cell {
    text-align: center;
    font-size: 12px;
  }

  .cell img {
    width: 24px;
    height: 24px;
  }
</style>
